package com.wxl.common.wiget

import android.content.Context
import android.graphics.Typeface
import android.util.AttributeSet
import android.widget.TextView

/**
 * create file time : 2021/3/15
 * create user : wxl
 * subscribe :
 */
class IconTextView : TextView{


    constructor(context: Context?) : super(context)
    constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
    constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(
        context,
        attrs,
        defStyleAttr
    )

    override fun onAttachedToWindow() {
        super.onAttachedToWindow()
        val typeface = Typeface.createFromAsset(context?.assets, "iconfont.ttf")
        this.typeface = typeface
    }
}